import os
import numpy as np
import tensorflow as tf
data_path = "/dataset/109subjects/LB2s/250Hz/"
x_data  = np.load(os.path.join(data_path, "train_data_total.npy"))

model = tf.keras.models.load_model("/tmp/checkpoint.h5")

names = ['Base', 'Left hand']
model.summary()
input = x_data[1].reshape(1, 2,500,1)
result = model.predict(input, batch_size=16)
output = np.argmax(result)
print("The predict is：")
print(names[output])
